package com.java.module.fire.service.impl;

import java.util.List;
import com.java.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.java.module.fire.mapper.FlollowMapper;
import com.java.module.fire.domain.Flollow;
import com.java.module.fire.service.IFlollowService;

/**
 * 关注用户Service业务层处理
 * 
 * @author Administrator
 * @date 2025-02-10
 */
@Service
public class FlollowServiceImpl implements IFlollowService {
    @Autowired
    private FlollowMapper flollowMapper;

    /**
     * 查询关注用户
     * 
     * @param followId 关注用户ID
     * @return 关注用户
     */
    @Override
    public Flollow selectFlollowById(Long followId) {
        return flollowMapper.selectFlollowById(followId);
    }

    /**
     * 查询关注用户
     *
     * @param flollow 关注用户
     * @return 关注用户
     */
    @Override
    public Flollow selectFlollowOne(Flollow flollow) {
        return flollowMapper.selectFlollowOne(flollow);
    }

    /**
     * 查询关注用户列表
     * 
     * @param flollow 关注用户
     * @return 关注用户
     */
    @Override
    public List<Flollow> selectFlollowList(Flollow flollow) {
        return flollowMapper.selectFlollowList(flollow);
    }

    /**
     * 新增关注用户
     * 
     * @param flollow 关注用户
     * @return 结果
     */
    @Override
    public int insertFlollow(Flollow flollow) {
        flollow.setCreateTime(DateUtils.getNowDate());
        return flollowMapper.insertFlollow(flollow);
    }

    /**
     * 修改关注用户
     * 
     * @param flollow 关注用户
     * @return 结果
     */
    @Override
    public int updateFlollow(Flollow flollow) {
        flollow.setUpdateTime(DateUtils.getNowDate());
        return flollowMapper.updateFlollow(flollow);
    }

    /**
     * 批量删除关注用户
     * 
     * @param followIds 需要删除的关注用户ID
     * @return 结果
     */
    @Override
    public int deleteFlollowByIds(Long[] followIds) {
        return flollowMapper.deleteFlollowByIds(followIds);
    }

    /**
     * 删除关注用户信息
     * 
     * @param followId 关注用户ID
     * @return 结果
     */
    @Override
    public int deleteFlollowById(Long followId) {
        return flollowMapper.deleteFlollowById(followId);
    }
}
